package chances.system.operator.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;


/**
 * 组织机构实体.
 * 
 * @author <a href="mailto:libf@chances.com.cn">libf</a>
 * @version 1.0
 */
@Entity
@Table(name="CS_SYS_ORGANIZATION")
@Proxy(lazy=false)
public class Organization implements Serializable  {

    private static final long serialVersionUID = 1L;
    
    public final static int STATUS_DELETE = -1;
    
    public final static int STATUS_NORMAL = 0;
    

    
    public static final Long DEFAULT_ID = 1L;
    
    public static final String PATH_SEPARATOR = "#";

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="org_id")
    private Long orgId;

    @Column(name = "org_name", length = 128)
    private String name;

    @Column(name = "org_code", length = 64)
    private String code;

    @Column(name = "org_status")
    private int status;

    @Column(name = "parent_id")
    private Long parentId;
    
    @Column(name = "path", length = 512)
    private String path;
    
    @Column(name="audit_type", length = 11)
    private Integer auditType;	//审核方式

    /**
     * @return the path
     */
    public String getPath() {
        return path;
    }

    /**
     * @param path the path to set
     */
    public void setPath(String path) {
        this.path = path;
    }

  
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name
     *            the name to set
     */
    public void setName(String name) {
        this.name = name;
    }


    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @param code
     *            the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * @return the auditType
     */
    public Integer getAuditType() {
        return auditType;
    }

    /**
     * @param auditType the auditType to set
     */
    public void setAuditType(Integer auditType) {
        this.auditType = auditType;
    }

	public Long getOrgId() {
		return orgId;
	}

	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
}
